
#include "iostream"
#include "vector"
#include "unordered_map"
#include "unordered_set"
#include "algorithm"
#include "string"
#include "list"
#include "string.h"

class OneLoop{
public:
    void run(int v1,int v2,int t,int s,int l){
        int r_l=0,d_l=0;
        int rest=0;
        int tick=0;
        while (r_l<l&&d_l<l){
            if(rest==0){
                r_l+=v1;
            }else{
                rest--;
            }
            d_l+=v2;
            if(r_l-d_l>=t){
                rest=s;
            }
            tick++;
        }
        if(r_l==d_l){
            printf("D\n");
        }else if(r_l>d_l){
            printf("R\n");
        }else{
            printf("T\n");
        }
        printf("%d\n",tick);
    }
};
class Solution {
public:
    void run() {

        bool first = true;
        int a,b,c,d,e;

        while (std::cin>>a>>b>>c>>d>>e)
        {
            OneLoop loop;
            loop.run(a,b,c,d,e);
        }
    }
};

int main() {
//    bool cur_num= true;
    Solution().run();
    return 0;
}

